<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>关于在Gitee上部署Hexo出现的常见问题及解决办法 | Raymond_Meng &#39;s blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="1.本地部署出现问题 ,出现 Cannot GET &#x2F;raymond__meng.gitee.io&#x2F; 解决办法 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 找到并打开自己本地hexo配置的文件_config.yml，找到root，更改为Gitee里我们为blog所建的库的名字，这里我是raymond__meng.gitee.io，这里需要注意的是所建库的名字必须和我们">
<meta property="og:type" content="article">
<meta property="og:title" content="关于在Gitee上部署Hexo出现的常见问题及解决办法">
<meta property="og:url" content="https://raymond__meng.gitee.io/raymond__meng.gitee.io/2021/01/09/%E5%85%B3%E4%BA%8E%E5%9C%A8Gitee%E4%B8%8A%E9%83%A8%E7%BD%B2Hexo%E5%87%BA%E7%8E%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/index.html">
<meta property="og:site_name" content="Raymond_Meng &#39;s blog">
<meta property="og:description" content="1.本地部署出现问题 ,出现 Cannot GET &#x2F;raymond__meng.gitee.io&#x2F; 解决办法 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 找到并打开自己本地hexo配置的文件_config.yml，找到root，更改为Gitee里我们为blog所建的库的名字，这里我是raymond__meng.gitee.io，这里需要注意的是所建库的名字必须和我们">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109155747185.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109160106506.png">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109160223705.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/2021010915590640.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109160000544.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109160346556.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20210109182545788.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70">
<meta property="article:published_time" content="2021-01-09T09:10:24.000Z">
<meta property="article:modified_time" content="2021-01-09T10:27:06.194Z">
<meta property="article:author" content="Raymond_Meng">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/20210109155747185.png">
  
    <link rel="alternate" href="/raymond__meng.gitee.io/atom.xml" title="Raymond_Meng 's blog" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/raymond__meng.gitee.io/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/raymond__meng.gitee.io/css/style.css">

  
    
<link rel="stylesheet" href="/raymond__meng.gitee.io/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/raymond__meng.gitee.io/" id="logo">Raymond_Meng &#39;s blog</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/raymond__meng.gitee.io/">Home</a>
        
          <a class="main-nav-link" href="/raymond__meng.gitee.io/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/raymond__meng.gitee.io/atom.xml" title="RSS 订阅"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="搜索"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://raymond__meng.gitee.io/raymond__meng.gitee.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-关于在Gitee上部署Hexo出现的常见问题及解决办法" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/raymond__meng.gitee.io/2021/01/09/%E5%85%B3%E4%BA%8E%E5%9C%A8Gitee%E4%B8%8A%E9%83%A8%E7%BD%B2Hexo%E5%87%BA%E7%8E%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/" class="article-date">
  <time class="dt-published" datetime="2021-01-09T09:10:24.000Z" itemprop="datePublished">2021-01-09</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      关于在Gitee上部署Hexo出现的常见问题及解决办法
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h4 id="1-本地部署出现问题-出现-Cannot-GET-raymond-meng-gitee-io"><a href="#1-本地部署出现问题-出现-Cannot-GET-raymond-meng-gitee-io" class="headerlink" title="1.本地部署出现问题 ,出现 Cannot GET /raymond__meng.gitee.io/ "></a>1.本地部署出现问题 ,出现<font color='red'> <code>Cannot GET /raymond__meng.gitee.io/</code> </font></h4><h4 id="解决办法"><a href="#解决办法" class="headerlink" title="解决办法"></a>解决办法</h4><p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 找到并打开自己本地hexo配置的文件<font color='red'><code>_config.yml</code></font>，找到<font color='red'><code>root</code></font>，更改为Gitee里我们为blog所建的库的名字，这里我是<font color='red'><code>raymond__meng.gitee.io</code></font>，这里需要注意的是所建库的名字必须和我们的用户名一致并且加上<font color='red'><code>.gitee.io</code></font><br><img src="https://img-blog.csdnimg.cn/20210109155747185.png"></p>
<h4 id="2-本地部署正常，但在Gitee提供的page里显示404-notfound"><a href="#2-本地部署正常，但在Gitee提供的page里显示404-notfound" class="headerlink" title="2.本地部署正常，但在Gitee提供的page里显示404 notfound"></a>2.本地部署正常，但在Gitee提供的page里显示<font color='red'><code>404 notfound</code></font></h4><h4 id="解决办法-1"><a href="#解决办法-1" class="headerlink" title="解决办法"></a>解决办法</h4><p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   首先检查自己的Gitee账户有没有添加SSH公钥<font color='red'><code>id.rsa.pub</code></font>, 其次看<font color='red'><code>_config.yml</code></font>里的<font color='red'><code>url</code></font>,<font color='red'><code>root</code></font>是否正确，这两个分别是Gitee分配给我们的地址（可以在Gitee pages里查看）和仓库名。还有<font color='red'><code>deploy</code></font>下<font color='red'><code>repo</code></font>的仓库地址是否正确<br><img src="https://img-blog.csdnimg.cn/20210109160106506.png"><br><img src="https://img-blog.csdnimg.cn/20210109160223705.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70"></p>
<h4 id="3-本地部署成功，gitee部署静态网页也成功，但是前端（图片等）样式缺失"><a href="#3-本地部署成功，gitee部署静态网页也成功，但是前端（图片等）样式缺失" class="headerlink" title="3.本地部署成功，gitee部署静态网页也成功，但是前端（图片等）样式缺失"></a>3.本地部署成功，gitee部署静态网页也成功，但是前端（图片等）样式缺失</h4><p><img src="https://img-blog.csdnimg.cn/2021010915590640.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70"></p>
<h4 id="解决办法-2"><a href="#解决办法-2" class="headerlink" title="解决办法"></a>解决办法</h4><p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这个就是配置文件中<font color='red'><code>url</code></font>和<font color='red'><code>root</code></font>有问题导致css文件没有起作用，改正后发现还是一样，需要清除浏览器缓存后方可看到效果<br><img src="https://img-blog.csdnimg.cn/20210109160000544.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70"></p>
<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果试过上述方法后还是不行，注意一下在<font color='red'><code>git bash</code></font>里有没有清除hexo缓存<font color='red'><code>hexo clean</code></font>,生成hexo静态网页并布署<font color='red'><code>hexo g -d</code></font>,还有更新一下<font color='red'><code>Gitee Pages Services</code></font>.<br><img src="https://img-blog.csdnimg.cn/20210109160346556.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70"><br><img src="https://img-blog.csdnimg.cn/20210109182545788.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2p1c3RfbWNjYw==,size_16,color_FFFFFF,t_70"><br><strong><em>END</em></strong></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://raymond__meng.gitee.io/raymond__meng.gitee.io/2021/01/09/%E5%85%B3%E4%BA%8E%E5%9C%A8Gitee%E4%B8%8A%E9%83%A8%E7%BD%B2Hexo%E5%87%BA%E7%8E%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/" data-id="ckjpicnbh000080v046kt5de3" data-title="关于在Gitee上部署Hexo出现的常见问题及解决办法" class="article-share-link">分享</a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
  
    <a href="/raymond__meng.gitee.io/2021/01/08/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">后一篇</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/raymond__meng.gitee.io/archives/2021/01/">一月 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/raymond__meng.gitee.io/2021/01/09/%E5%85%B3%E4%BA%8E%E5%9C%A8Gitee%E4%B8%8A%E9%83%A8%E7%BD%B2Hexo%E5%87%BA%E7%8E%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/">关于在Gitee上部署Hexo出现的常见问题及解决办法</a>
          </li>
        
          <li>
            <a href="/raymond__meng.gitee.io/2021/01/08/hello-world/">Hello World</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2021 Raymond_Meng<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/raymond__meng.gitee.io/" class="mobile-nav-link">Home</a>
  
    <a href="/raymond__meng.gitee.io/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/raymond__meng.gitee.io/js/jquery-3.4.1.min.js"></script>



  
<script src="/raymond__meng.gitee.io/fancybox/jquery.fancybox.min.js"></script>




<script src="/raymond__meng.gitee.io/js/script.js"></script>





  </div>
</body>
</html>